/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.gruposp2p.aula.gwt.client.model;

import java.io.Serializable;
import java.util.List;

/**
 *
 * @author jj
 */
public class Subject implements Serializable {
	
    private static final long serialVersionUID = 1L;
    private Integer id;
    private String name;
    private String description;
    private Link link;
    private Link courseLink;
    private List<Link> itemcalificablesLinks;
    private List<Link> absencesLinks;

    public Subject() {
    }

    public Subject(Integer id) {
        this.id = id;
    }

    public Subject(Integer id, String name) {
        this.id = id;
        this.name = name;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setLink (Link link) {
    	this.link = link;
    }
    
    public Link getLink() {
    	return link;
    }
    
    public void setAbsencesLinks (List<Link> absencesLinks) {
    	this.absencesLinks = absencesLinks;
    }
    
    public List<Link> getAbsencesLinks() {
    	return absencesLinks;
    }    
    
    public void setItemcalificablesLinks (List<Link> itemcalificablesLinks) {
    	this.itemcalificablesLinks = itemcalificablesLinks;
    }
    
    public List<Link> getItemcalificablesLinks() {
    	return itemcalificablesLinks;
    }
    
    public void setCourseLink (Link link) {
    	this.courseLink = link;
    }
    
    public Link getCourseLink() {
    	return courseLink;
    }   
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Subject)) {
            return false;
        }
        Subject other = (Subject) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.aula.databasemodel.entity.Subject[id=" + id + "]";
    }

}